<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .red{
            color:red;
        }
    </style>
</head>
<body>
    <div id="app">
        <my-header></my-header>
        <aaa></aaa>
    </div>
    
    <div id="app2">
    </div>
</body>
<script src="./base/vue.js"></script>

<script>
    //局部组件
    // var Header = Vue.extend({
    //     template:"<h3>我是h3标签...</h3>"
    // })
    var vm = new Vue({
        el: "#app",
        //局部组件注册
        components:{
            "my-header":{
                template:"<h3>我是h3标签...</h3>"
            },
            "aaa":{
                template:"<span>我是span元素！</span>"
            }
        }
    })

    new Vue({
        el:"#app2"
    })
</script>
</html>